Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

243
Vistas
ThreeJS KTX2Loader "Attempt to load unsupported compressed texture format in .uploadTexture()"

I'm debugging some unfamiliar code, and am getting the following 3 when it's loading KTX2 textures:

THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()

WebGL warning: compressedTexSubImage: format must match the format of the existing texture image.

WebGL warning: blitFramebuffer: DRAW_FRAMEBUFFER may not have multiple samples.

The textures are also loading in as black, which I believe is linked to the warnings.

I've managed to track it down to these bits of code

this.ktx2Loader = new KTX2Loader(this.manager).detectSupport(editor.renderer.renderer);

...

loader = this.ktx2Loader;
const texture = await loadTexture(textureUrl, loader);

...

function loadTexture(src, textureLoader = new TextureLoader()) {
  return new Promise((resolve, reject) => {
    textureLoader.load(src, resolve, null, error => reject(new RethrownError(`Error loading texture "${src}"`, error)));
  });
}

And that's where it disappears into ThreeJS internal code that I'm not experienced enough to know how to handle.

The formats are loading in with a format of 36492 which I believe is KTX2 from what I can tell, so I'm a little unsure of what's causing the error. Stranger still it's working on some co-workers machines, but not my own.

Anyone know what might be going on?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The compressed format you try to load (36492 or 0x8E8C) is EXT_texture_compression_bptc and more specifically COMPRESSED_RGBA_BPTC_UNORM_EXT (aka BC7) Here is the webgl spec

Any compressed format support in webgl is provided as an extension. As such you cannot assume that any format is supported for a given platform/hardware. Generally, each OS require it's own set.

To properly use compressed texture in webgl, you need to export various formats, and based on runtime capabilities tests, load the proper one. And ultimatly, always provide a non compressed fallback(jpg, png, webp...).

Note that KTX is just a container and not a compression format/codec. It can contain any format AFAIK.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda